<template>
    这是setup
    <h2>{{subh2}}</h2>
    <br/>
    <SubComp @myadd="add" one="one" two="two">
    </SubComp>
</template>

<script>
    import SubComp from "../components/SubComp";

    export default {
        name: "SetUp",
        data() {
            return {
                subh2: "",
            }
        },
        components: {
            SubComp
        },
        methods: {
            add(str) {
                this.subh2 = str
                console.log(this.subh2)
            }
        }
    }
</script>

<style scoped>

</style>
